<?php

namespace app\home\controller;

use think\Controller;
use think\Request;

class Base extends Controller
{
    public function __construct(Request $request = null)
    {
//    接收并验证token
        parent::__construct($request);
        $token = input('token');
        if (!isset($token)) {
            $this->error('token的值不存在');
        }

    }
}
